/***********************************************************************
 *   @package：cn.wj.base.util，@class-name：Page.java      
 *   @copyright     Copyright:   2015-2016     
 *   @creator       wenjie 
 *   @create-time   2016年1月10日   下午2:13:16   
 *   @revision      $Id: 1.0    
 ***********************************************************************/  
package cn.wj.base.util;

import java.util.List;

public class Page {
	
	private List result;
	private int pageNum=1;//当前页码
	private int pageSize=20;//每页显示的条数
	private int totalRecord;//总记录数
	private int totalPage;//总页数
	private int startIndex;//每页数据开始的索
	private String url;
	 
	public List getResult() {
		return result;
	}
	public void setResult(List result) {
		this.result = result;
	}
	public int getPageNum() {
		return pageNum;
	}
	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getTotalRecord() {
		return totalRecord;
	}
	public void setTotalRecord(int totalRecord) {
		this.totalRecord = totalRecord;
	}
	public int getTotalPage() {
		//总页数
		totalPage = totalRecord%pageSize==0?totalRecord/pageSize:(totalRecord/pageSize+1);
		return totalPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public int getStartIndex() {
		//计算每页数据开始的索
		startIndex = (pageNum-1)*pageSize;
		return startIndex;
	}
	public void setStartIndex(int startIndex) {
		this.startIndex = startIndex;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	 
}